package homework.three;

import java.io.FileWriter;
import java.io.IOException;

public class Person {
    public String name;
    public String sex;
    public Integer age;
    public String idNo;
    public Boolean isMerried;

    public Person(){

    }

    public Person(String name, String sex, Integer age, String idNo, Boolean isMerried){
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.idNo = idNo;
        this.isMerried = isMerried;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getIdNo() {
        return idNo;
    }

    public void setIdNo(String idNo) {
        this.idNo = idNo;
    }

    public Boolean getMerried() {
        return isMerried;
    }

    public void setMerried(Boolean merried) {
        isMerried = merried;
    }

    @Override
    public String toString() {
        return "name=" + name + '\n' +
                "sex=" + sex + '\n' +
                "age=" + age + '\n' +
                "idNo=" + idNo + '\n' +
                "isMerried=" + isMerried;
    }


}
